// 忽略 ResizeObserver 循环错误
window.addEventListener('error', (e) => {
  if (e.message?.includes('ResizeObserver') || e.message?.includes('ResizeObserver loop completed with undelivered notifications')) {
    e.stopImmediatePropagation();
    e.preventDefault();
    return false;
  }
});

// 对于 Promise 错误
window.addEventListener('unhandledrejection', (e) => {
  if (e.reason?.message?.includes('ResizeObserver')) {
    e.stopImmediatePropagation();
    e.preventDefault();
    return false;
  }
});
import React from 'react';
import { createRoot } from 'react-dom/client';
import OverviewFlow from './App';
import './index.css';


const container = document.getElementById('root');
const root = createRoot(container);
root.render(<OverviewFlow />);

window.addEventListener('error', (e) => {
  if (e.message?.includes('ResizeObserver') || e.message?.includes('ResizeObserver loop completed with undelivered notifications')) {
    e.stopImmediatePropagation();
    e.preventDefault();
    return false;
  }
});

// 对于 Promise 错误
window.addEventListener('unhandledrejection', (e) => {
  if (e.reason?.message?.includes('ResizeObserver')) {
    e.stopImmediatePropagation();
    e.preventDefault();
    return false;
  }
});
